﻿namespace BEGDC.CC.Web.EZVisit.Help
{
    #region Using Directives

    using System;
    using System.IO;
    using System.Web.UI;

    #endregion

    public partial class EZVisitProcess : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void btnExport_Click(object sender, EventArgs e)
        {
            this.Response.Clear();

            this.Response.ContentType = "image/jpeg";
            this.Response.AddHeader("Content-Disposition", "attachment; filename=EZVisitProcess.jpg");

            var file = new FileInfo(this.Server.MapPath("~/EZVisit/Help/Templates/EZ-V details.jpg"));

            this.Response.AddHeader("Content-Length", file.Length.ToString());

            this.Response.BufferOutput = true;

            this.EnableViewState = false;

            this.Response.WriteFile(file.FullName);

            this.Response.Flush();
        }
    }
}